﻿using UnityEngine;
using System.Collections;
using UnityEditor;
namespace UtilEditors
{


    [CustomEditor(typeof(DebugHandles))]
    public class HandlesInspector : Editor
    {
        DebugHandles myHandles;
        void OnEnable()
        {
            myHandles = (DebugHandles)target;
        }
        public override void OnInspectorGUI()
        {
            DrawDefaultInspector();
        }
        private void OnSceneGUI()
        {
            //显示字符串 
            var e = myHandles.LabelDic.GetEnumerator();
            while (e.MoveNext())
            {
                var cur = e.Current;
                Handles.Label(cur.Value, cur.Key);
            }
        }

    }
}

